package com.bootMybatis.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.util.StringUtils;

public class DateUtils {

	public static String getDate(String format) {
		if (StringUtils.isEmpty(format)) {
			format = "yyyyMMdd";
		}
		Date date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		return sdf.format(date);
	}
}
